<!DOCTYPE html>
<html>
<head>
	<title>RSS 2 Email</title>
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

	<!-- Bootstrap -->
	<link href="css/bootstrap.min.css" rel="stylesheet" media="screen">
	<link href="css/bootstrap-responsive.min.css" rel="stylesheet" media="screen">
	<link href="css/default-style.css" rel="stylesheet" media="screen">

	
</head>
<body>

	<section>
		<h3>Prefix Text:</h3>
		<textarea name="prefix" rows="40" cols="60" class="ckeditor" id="prefix"></textarea>
		<p>HTML code is accepted.</p>
	</section>

	<div id="header">
		     <h1>RSS feed to email</h1>
	</div>

	<div id="messages">
		<ul>
			{loop="page.messages"}
			<li class="{$value.type}">{$value.text}</li>
			{/loop}
		</ul>
	</div>
	
	<div>
		<form id="newsletter" method="post" action="">
			<input type="hidden" name="todo" value="SendEmail">
			<input class="paramBase64JsonFeedItems" type="hidden" name="serializedFeedItems" value="">

			
			<section>
				<h3>Include news feed:</h3>
				<select name="selected_feed" id="selected_feed">
					{loop="page.feeds"}
					<option value="{$value.url}">{$value.title}</option>
					{/loop}
				</select>
				<br>
				Load <input type="range" id="numFeedEntries" min="3" max="10" default="5"> items.<br>
				<button class="buttonLoadFeed" type="button">Load Feed data</button>

				<div id="rssitems"></div>
			</section>

			<section class="form-footer">
				<h3>Set recipient:</h3>

				<input name="recipient" id="recipient" list="recipient_proposals" />
				<datalist id="recipient_proposals">
					{loop="page.recipients"}
					<option value="{$value}"></option>
					{/loop}
				</datalist>
				
				<button class="buttonSendEmail" type="submit">Send newsletter to mailrecipient</button>
				
			</section>


		</form>
	</div>


<script src="http://www.google.com/jsapi" type="text/javascript"></script>
<script type="text/javascript">
	google.load("feeds", "1");
</script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.0/jquery.min.js" type="text/javascript" ></script>
<script src="js/bootstrap.min.js" type="text/javascript" ></script>
<script src="js/logger.js" type="text/javascript" ></script>
<script src="js/rss-printer.js" type="text/javascript" ></script>
<script src="js/base64.js" type="text/javascript" ></script>

<!-- html editor 
<script src="ckeditor/ckeditor.js"></script>
-->
<script src="js/nicEdit.js"></script>

<!-- init page after everything is done -->
<script src="js/gui-index.js" type="text/javascript" ></script>

<script>

$(document).ready(function() {
	new nicEditor({iconsPath : 'tpl/js/nicEditorIcons.gif', fullPanel : true})
		.panelInstance('prefix');
});

</script>
</body>
</html>
